﻿@model CarSales.Models.Car

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Car</legend>

        @Html.HiddenFor(model => model.CarId)

        <div class="editor-label">
            @Html.LabelFor(model => model.CarTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarTitle)
            @Html.ValidationMessageFor(model => model.CarTitle)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarMake)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarMake)
            @Html.ValidationMessageFor(model => model.CarMake)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarModel)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarModel)
            @Html.ValidationMessageFor(model => model.CarModel)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarColor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarColor)
            @Html.ValidationMessageFor(model => model.CarColor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarShortDescription)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarShortDescription)
            @Html.ValidationMessageFor(model => model.CarShortDescription)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarLongDescription)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarLongDescription)
            @Html.ValidationMessageFor(model => model.CarLongDescription)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarDateEntered)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarDateEntered)
            @Html.ValidationMessageFor(model => model.CarDateEntered)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarDateUpdated)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarDateUpdated)
            @Html.ValidationMessageFor(model => model.CarDateUpdated)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CarOwnerId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CarOwnerId)
            @Html.ValidationMessageFor(model => model.CarOwnerId)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
